<!DOCTYPE">
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
  <title>第二题不断移动的div</title>
</head>
<body>
  <div style="position: absolute;left:0px; top: 20px;width: 20px;height: 20px;background: red;"></div>
  <script>
    var div = document.querySelector('div');
      console.log(div);
      function run() {
      	var i = 1;
       var T =window.setInterval(function() {
       	 	if(i<200) {
      			div.style.left = i + 'px';
      	}
       	i++;
       }, 25);
      }
      run();
  </script>
</body>
</html>